//https://www.nowcoder.com/practice/83073edaa76b4d179ee0366518a58dba?tpId=46&tqId=38890&rp=1&ru=/ta/classic-code&qru=/ta/classic-code&difficulty=1&judgeStatus=&tags=/question-ranking
class Ants {
public:
    double antsCollision(int n) {
        // write code here
        return 1 - (2 / pow(2, n));
    }
};

//https://www.nowcoder.com/practice/1efe2386491f4235b78a34cd1b5fb3d0?tpId=46&tqId=38891&rp=1&ru=/ta/classic-code&qru=/ta/classic-code&difficulty=1&judgeStatus=&tags=/question-ranking
class CrossLine {
public:
    bool checkCrossLine(double s1, double s2, double y1, double y2) {
        // write code here
        if(s1 != s2)
            return true;
        else if(s1 == s2 && y1 == y2)
            return true;
        else
            return false;
    }
};